Test requested --target from source of truth
authorAlex Crichton <alex@alexcrichton.com>
Fri, 30 Sep 2016 20:07:37 +0000 (13:07 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 30 Sep 2016 20:07:37 +0000 (13:07 -0700)
commit9f1203fa13b2df3157cf650801a796f972b368fb
tree6114d2cd9f23483a7647f4ace5952ec6be06bf61
parentd8936af1390ab0844e5e68b459214f2529c9f647
Test requested --target from source of truth

We skip doc tests for any cross compiles (as they don't work) but to detect a
cross compile we checked `--target` but forgot to check other locations like
`CARGO_BUILD_TARGET` or `[build.target]`. This alters the check to ensure that
it verifies from the source of truth whether a cross compilation happened or
not.

Closes #3143
src/cargo/ops/cargo_rustc/compilation.rs
src/cargo/ops/cargo_rustc/mod.rs
src/cargo/ops/cargo_test.rs